]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
messageTray: Ensure notifications are focused after they are expanded
authorJasper St. Pierre <jstpierre@mecheye.net>
Fri, 21 Jun 2013 19:24:50 +0000 (15:24 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Fri, 21 Jun 2013 19:32:14 +0000 (15:32 -0400)
If we focus notifications before they're expanded, the body and action
area won't be visible, and the can_focus members like the text entry
will not be able to be focused.

Ensure that all of the all actors that would be in an expanded notification
are visible before we attempt to focus them.

https://bugzilla.gnome.org/show_bug.cgi?id=698778

js/ui/messageTray.js

index c0569247a474932c2cb5aa77db65cfea52c10b0e..afbcf269a8f2e0ab121949de71a754591939dea8 100644 (file)
@@ -2597,16 +2597,16 @@ const MessageTray = new Lang.Class({
     },
 
     _expandNotification: function(autoExpanding) {
-        // Don't focus notifications that are auto-expanding.
-        if (!autoExpanding)
-            this._ensureNotificationFocused();
-
         if (!this._notificationExpandedId)
             this._notificationExpandedId =
                 this._notification.connect('expanded',
                                            Lang.bind(this, this._onNotificationExpanded));
         // Don't animate changes in notifications that are auto-expanding.
         this._notification.expand(!autoExpanding);
+
+        // Don't focus notifications that are auto-expanding.
+        if (!autoExpanding)
+            this._ensureNotificationFocused();
     },
 
     _onNotificationExpanded: function() {